package com.cy.air.postXml.view
{
	import com.cy.air.postXml.ApplicationFacade;
	import com.cy.air.postXml.view.components.ResponseView;
	
	import flash.net.Responder;
	
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;

	public class ResponseMediator extends Mediator implements IMediator
	{ 
		public static const NAME:String="responseMediator";
		
		public function ResponseMediator(view:ResponseView)
		{
			super(NAME,view);	
		}
		
		public function get responseView():ResponseView
		{
			return viewComponent as ResponseView;
		}
		
		override public function listNotificationInterests():Array
		{
			return [ApplicationFacade.UPDATE_RESPONSE_TEXT];
		}
		
		override public function handleNotification(notification:INotification):void
		{
			responseView.responseText=notification.getBody() as String;
		}
	}
}